package com.ttctracker.classes;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;

public class Route implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String _tag;
	private String _title;
	private Double _minLat,_minLon,_maxLat,_maxLon;
	private ArrayList<Direction> _directions;
	private HashMap<String, StopItem> _stopItems;
		
	public HashMap<String, StopItem> get_stopItems() {
		return _stopItems;
	}
	public void set_stopItems(HashMap<String, StopItem> _stopItems) {
		this._stopItems = _stopItems;
	}
	public ArrayList<Direction> get_directions() {
		_directions.trimToSize();
		return _directions;
	}
	public void set_directions(ArrayList<Direction> _directions) {
		this._directions = _directions;
	}
	public String get_tag() {
		return _tag;
	}
	public void set_tag(String _tag) {
		this._tag = _tag;
	}
	public void set_title(String _title) {
		this._title = _title;
	}
	public String get_title() {
		return _title;
	}
	public Double get_minLat() {
		return _minLat;
	}
	public void set_minLat(Double _minLat) {
		this._minLat = _minLat;
	}
	public Double get_minLon() {
		return _minLon;
	}
	public void set_minLon(Double _minLon) {
		this._minLon = _minLon;
	}
	public Double get_maxLat() {
		return _maxLat;
	}
	public void set_maxLat(Double _maxLat) {
		this._maxLat = _maxLat;
	}
	public Double get_maxLon() {
		return _maxLon;
	}
	public void set_maxLon(Double _maxLon) {
		this._maxLon = _maxLon;
	}
	/**
	 * 
	 */
	public Route() {
		_tag="";
		_title="";
		_directions=new ArrayList<Direction>(2);
		_stopItems=new HashMap<String, StopItem>();
		_minLat=0.0;
		_minLon=0.0;
		_maxLat=0.0;
		_maxLon=0.0;
	}
	
	
	/**
	 * @param _tag
	 * @param _title
	 */
	public Route(String _tag, String _title) {
		super();
		this._tag = _tag;
		this._title = _title;
		_directions=new ArrayList<Direction>(2);
		_stopItems=new HashMap<String, StopItem>();
		_minLat=0.0;
		_minLon=0.0;
		_maxLat=0.0;
		_maxLon=0.0;
	}
	/**
	 * @param _tag
	 * @param _title
	 * @param _stops
	 */
	public Route(String _tag, String _title, ArrayList<Direction> _directions) {
		super();
		this._tag = _tag;
		this._title = _title;
		this._directions = _directions;
		_stopItems=new HashMap<String, StopItem>();
		_minLat=0.0;
		_minLon=0.0;
		_maxLat=0.0;
		_maxLon=0.0;
	}
	@Override
	public String toString() {
		return _title;
	}
	
}
